package com.syq.play.ui;

import com.syq.play.AppContent;
import com.syq.play.R;
import com.syq.play.api.MediaStoreApi;
import com.syq.play.api.SongApi;
import com.syq.play.impl.MediaStoreImpl;
import com.syq.play.impl.SongImpl;
import com.syq.play.util.FileScanTool;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class LoginActivity extends Activity{
	private Context context;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.layout_login);
		context=this;
		loading();
	}
	private void loading(){
		new AsyncTask<Void, Void, Void>() {

			@Override
			protected Void doInBackground(Void... params) {
//				FileScanTool.scanFile(context, FileScanTool.SDCARD, ".mp3");
				return null;
			}
			@Override
			protected void onPostExecute(Void result) {
				startActivity(new Intent(context, SRPlayActivity.class));
				getWindow().clearFlags(
						WindowManager.LayoutParams.FLAG_FULLSCREEN);
				finish();
			};
		}.execute();
	}
}
